/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #2c5530;
}

.nav-logo i {
    margin-right: 10px;
    color: #4CAF50;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #4CAF50;
}

.nav-auth {
    display: flex;
    gap: 15px;
}

.btn-login, .btn-register {
    padding: 8px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-login {
    color: #4CAF50;
    border: 2px solid #4CAF50;
}

.btn-login:hover {
    background: #4CAF50;
    color: white;
}

.btn-register {
    background: #4CAF50;
    color: white;
    border: 2px solid #4CAF50;
}

.btn-register:hover {
    background: #45a049;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 150px 0 100px;
    display: flex;
    align-items: center;
    min-height: 80vh;
}

.hero-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn-primary, .btn-secondary {
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
}

.hero-image {
    text-align: center;
}

.hero-image i {
    font-size: 15rem;
    opacity: 0.3;
}

/* 分类区域样式 */
.categories {
    padding: 100px 0;
    background: white;
}

.categories h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #2c5530;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.category-card i {
    font-size: 3rem;
    color: #4CAF50;
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c5530;
}

.category-card p {
    color: #666;
    line-height: 1.6;
}

/* 最新帖子样式 */
.latest-posts {
    padding: 100px 0;
    background: #f8f9fa;
}

.latest-posts h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #2c5530;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.post-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.post-time {
    color: #666;
    font-size: 0.9rem;
}

.post-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2c5530;
}

.post-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.post-stats {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-more {
    text-align: center;
}

/* 页脚样式 */
.footer {
    background: #2c5530;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 20px;
    color: #4CAF50;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #4CAF50;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #ccc;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu, .nav-auth {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
}